The Dreamweaver JavaScript API > CSS style functions > dreamweaver.cssStylePalette.getSelectedTarget() |
![]() ![]() ![]() |
dreamweaver.cssStylePalette.getSelectedTarget()
Availability
Dreamweaver 3.0
Description
Gets the selected element in the Apply To pop-up menu at the top of the Style panel.
Arguments
None.
Returns
The object to which the style should be applied, or NULL
if the target is the current selection.
Enabler
None.
Example
Before applying a style, use dw.cssStylePalette.getSelectedTarget()
in case the user has changed the target, as shown.
For example:
var currDOM = dw.getDocumentDOM(); currDOM.applyCSSStyle(dw.cssStylePalette.getSelectedTarget(), ¬ "codeRed");
![]() ![]() ![]() |